package com.wavehi.service;

import com.wavehi.pojo.User;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author WaveHi
 * @Date 18/10/2021 下午 3:40
 * @Version 1.0
 * @Contact HJBWaveHi@163.com
 * @Description Deal the request about user.
 */
@Service
public interface UserService {

    /**
     * Add a user
     * @param user User information
     * @return If false is returned, addition fails.
     */
    Boolean addUser(User user);

    /**
     * Add multi user.
     * @param users Users
     * @return If false is returned, addition fails.
     */
    Boolean addMultiUsers(List<Object[]> users);

    /**
     * Get user according to id
     * @param id User id
     * @return Return the specified user.
     */
    User getUser(Long id);

    /**
     * Get the specified user name
     * @param id User id
     * @return Return user name.
     */
    String getUsername(Long id);

    /**
     * Get all the user.
     * @return Return a list that contains all the user.
     */
    List<User> getAllUser();
}
